package com.example.login.Service;

import com.example.login.Mapper.AddressMap;
import com.example.login.Pojo.Address;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service("AddressService")
public class AddressService {
    @Autowired
    AddressMap addressMap;
    public void addAddress(int user_id,String user_name,String tel,String province,String city,String county,
                           String all_address,int address_tag)
    {
        addressMap.AddAddress(user_id,user_name,tel,province,city,county,all_address,address_tag);
    }
    public ArrayList<Address> getAddress(int user_id)
    {
        return addressMap.getAddress(user_id);
    }

    public void update(int user_id)
    {
        addressMap.update(user_id);
    }
    public void updateTag(int user_id,int id )
    {
        addressMap.updateTag(user_id, id);
    }
}
